/*
  F8E419
  9F1046
  1299B8
  08839F
*/

/* Skeleton
_____________________________________________________________________________ */

body {
  font-size: 13px;
  font-family: "Georgia", serif;
  margin: 0;
  padding: 0;
}

a {
  color: #1299B8;
}

#top {
  background-color: rgb(235,0,90);
  color: #ffffff;
  padding: 3em 0 3em;
  position: relative;
  z-index: 3;

}

#bottom {
  margin-top: 4em;
}

#header, #footer {
  clear: both;
  overflow-y: hidden;
  margin-left: auto;
  margin-right: auto;
  width: 800px;
}

#header {
  color: #ffffff;
  text-align: center;
  text-transform: uppercase;
}

#top #header h1 {
  font-family: "ProximaNova-Regular";
  font-size: 48px;
  letter-spacing: 0.271em;
  margin-bottom: 0.25em;
}

#top #header h1 strong {
  font-family: 'ProximaNova-Bold';
}

#top #header h1 a {
  color: #fff;
  text-decoration: none;
}

#top #header h2 {
  font-family: "ProximaNova-Regular";
  color: #ffffff;
  font-size: 29.666px;
  letter-spacing: 0.271em;
  margin: 0;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
}

#middle {
  margin: 0 auto;
  position: relative;
  width: 100%;
  z-index: 1;
}

/* NAVIGATOR BLOCK LEVEL
_____________________________________________________________________________*/
#navigator {
  margin: 0;
  left: 0;
  width: 100%;
  padding: 0;
  position: absolute;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

#navigator-inner {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: block;
  position: relative;
  margin: 0 auto;
}

#mask{
  position: absolute;
  top: -10px;
  left: -8px;
  right: -8px;
  background-color: #fff;
  height: 30px;
  display: block;
}

#nav-bar {
  background-color: rgb(235,0,90);
  position: relative;
  width: 100%;
  -webkit-box-shadow: 0 5px 10px #fff;
  -moz-box-shadow: 0 5px 10px #fff;
  box-shadow: 0 5px 10px #fff;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

#nav-bar-wrap {
  margin: 0;
  position: absolute;
  width: 100%;
  z-index: 3;
}

#toc-holder {
  clear: both;
  display: block;
  margin: 160px auto 0;
  position: relative;
}

#toc-list {
  padding-top: 46px;
  z-index: 2;
}

/* NAVIGATOR STYLE
_____________________________________________________________________________*/
#navigator,
#navigator h1,
#navigator h2 {
  font-family: "ProximaNova-Regular";
}

#navigator h1 {
  color: #fff;
  font-size: 16px;
  margin: 0;
  padding: 8px 0;
  position: relative;
  text-align: center;
  width: 210px;
}

#navigator h1 a {
  color: #fff;
  text-decoration: none;
}

#navigator h2 {
  font-size: 16px;
  margin: 10px 4px 10px;
}

#nav-bar h1, #nav-bar h2 {
  display: inline-block;
}

#navigator strong {
  font-family: "ProximaNova-Bold";
}

#table-of-contents {
  float: left;
}

#toc-holder a {
  color: #000;
  /*display: block;*/
  text-decoration: none;
}

#toc-holder a:hover {
  color: rgb(235,0,90);
}

#toc-list ul {
  list-style: none;
  width: 220px;
  float: left;
  min-width: 220px;
}

#toc-list ul>li .expand {
  font-family: "Pictos";
  float: right;
  text-transform: lowercase;
  display:none;
}

#toc-list>ul {
  clear: both;
  display: block;
  margin: 0;
  padding: 0 0 0 5px;
  position: relative;
}

#toc-list ul>li:hover .expand {
  cursor: pointer;
  visibility: visible;
}

#toc-list ul>li .expand:hover {
  color: #08839F;
}

/* Chapter Titles*/
#toc-list>ul>li {
  font-family: "ProximaNova-Bold";
  font-size: 13px;
  margin: 10px 0 8px;
  text-transform: uppercase;
}

/* Chapter Section lists*/
#toc-list ul>ul {
  margin: 0;
  padding: 0;
  position: relative;
  display: none;
}

#toc-list ul>ul a {
  color: #777;
}

/* Chapter Section */
#toc-list ul>ul li {
  margin: 0 0 1px;
  padding: 0;
}

a#purchase-link {
  color: #fff;
  display: inline-block;
  float: right;
  padding: 10px;
  position: relative;
}

/* END NAVIGATOR
_____________________________________________________________________________*/

#footer {
  background-color: rgb(246,246,246);
  color: #ababab;
  font-size: 13px;
  overflow-y: auto;
  width: 800px;
}

#footer a {
  color: #777777;
}

#footer h4 {
  color: #000000;
  font-size: 15px;
  font-family: "ProximaNova-Regular";
  margin-bottom: 0.8em;
}

#footer .one-third {
  float: left;
  font-size: 13px;
  margin: 0 1%;
  margin: 0 -webkit-calc(10px);
  margin: 0 -moz-calc(10x);
  margin: 0 calc(10px);
  width: 31%;
  width: -webkit-calc(33% - 20px);
  width: -moz-calc(33% - 20px);
  width: calc(33% - 20px);
}

#footer p {
  font-size: 13px;
  line-height: 16px;
}

#footer img {
  width: auto;
}

#container {
  padding-top: 2.5em;
  width: 800px;
  margin: 0 auto;
  line-height: 1.317em;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
/*  background-image: url('../imgs/vertical_grid.jpg');*/
}

h1 {
  font-size: 320%;
  line-height: 1em;
  font-style: normal;
  margin-bottom:1.3em;
  margin-top: 0.4em;
}

h2 {
  font-size: 360%;
  line-height: 1em;
  font-style: normal;
  margin-top: 0px;
  margin-bottom: 0.3em;
  color: #202020;
}

/* To squash extra h2 element on title page */
body>h2:nth-child(2) {
  display: none;
}

h3 {
  font-size: 240%;
  color: #404040;
  margin-top: 2em;
}

h4,h5 {
  font-size: 180%;
}

h1, h2, h3, h4, h5 {
  font-family: 'ProximaNova-Bold';
  color: #222;
  font-weight: normal;
}

h1, h2, h3, h4, h5, h6 {
  clear: both;
}

h3, h4, h5, h6 {
  line-height: 1.317em;
  margin: 1.6em 0 0.5em;
}

p {
  font-size: 18.2px;
  line-height: 1.618em;
  letter-spacing:0.03em;
}

li {
  font-size: 18.2px;
}

/* Tables
_____________________________________________________________________________ */

table {
  font-size: 8pt;
  font-family: "ProximaNova-Regular";
  color: #606060;
  border-collapse: collapse;
  width: 100%;
  text-align: center;
  margin: 3em 0;
  table-layout: fixed;
  border: 1px solid #D1D1D1;
}

table td, table th {
  padding: 0.5em;
}

/* weird fix. setting font size 1pt up in header to make it look the same size */
table th {
  color: #404040;
  font-size: 9pt;
  border: 1px solid #D1D1D1;
  background-color: rgb(92%,92%,92%);
  font-family: "ProximaNova-Bold";
  font-style: normal;
}

table td {
  border: 1px solid #D1D1D1;
}

table td p {
  margin: 0;
}

table.code pre {
  font-size: 0.9em;
}

table.code td {
  text-align: left;
}

/* Styles
_____________________________________________________________________________ */

.line-through {
  text-decoration: line-through;
}

.underline {
  text-decoration: underline;
}

/* Definition Lists
_____________________________________________________________________________ */

.list h4, .table h4 {
  clear: none;
}

dl {
  width:100%;
  overflow:hidden;
  margin: 0;
  padding: 0;
}

dt, dd {
  font-family: "ProximaNova-Regular";
  font-size: 16px;
  float: left;
  line-height: 1em;
  margin: 0 0 0.5em 0;
}

dt {
  width:30%;
}


dd {
  width:70%;
}

dd p {
  line-height: 1em;
  margin: 0;
  padding: 0;
}



/* Quote
_____________________________________________________________________________ */

h2 + blockquote {
  font-family: "Georgia";
  font-style: italic;
  margin: 2em 0 2em 0;
  font-size: 16pt;
  line-height: 20pt;
  color: #000000;/*#808080;*/
}

h2 + blockquote span.attribution {
  display: block;
  font-style: normal;
  font-size: 16pt;
  margin-left: 24px;
  margin-top: 4px;
}

blockquote {
  font-family: "ProximaNova-Regular";
  font-style: italic;
  margin: 12px 40px 12px 40px;
  font-size: 12pt;
  line-height: 14pt;
  color: #000000;/*#808080;*/
}

blockquote span.attribution {
  display: block;
  font-style: italic;
  font-size: 12pt;
  margin-left: 24px;
  margin-top: 12px;
}

/* Default Elements
_____________________________________________________________________________ */

canvas {
  border: 1px solid gray;
  //margin-bottom: 1.15em;
  //border-left: 0.4em solid #272727;
}

canvas:focus {
  outline: none;
}

.sketch-controls {
  color: #000000;
  margin: 5px 0 15px;
}

.sketch-controls button {
  border: 0;
  color: white;
  padding: 5px 8px;
  font-size: 100%;
  font-family: "ProximaNova-Regular";
}

.sketch-controls button:hover {
  cursor: pointer;
  background-color: #000;
}

.sketch-controls .reset {
  background-color: #404383;
}

.sketch-controls .pause {
  background-color: #408448;
}

/* Span Classes Styling
_____________________________________________________________________________ */

span.highlight {
  background-color: #E9E9E9;
  font-family: "ProximaNova-SemiBold";
  font-size: 16pt;
  display: block;
  padding: 0.8em;
  text-align: center;
}

/* .example = exercises
   .tip = projects
   .note = breakout boxes
*/

.note h2, .tip, .example h2,
.note h3, .tip h3, .example h3,
.note h4, .tip h4, .example h4 {
  color: #191919;
  margin-bottom: 0.3em;
  font-style: normal;
  font-family: 'ProximaNova-Bold';
}

/* == BREAKOUT BOXES */
.note {
  color: #191919;
  padding: 1.4em 1.5em;
  margin: 1.15em 0;
  background-color: #E9E9E9;
}

.note p {
  font-size: 12pt;
}


/* == EXERCISES */
div.example {
  background-color: #E9E9E9;
  color: #000;
  padding: 3em 1.5em 1em;
  position: relative;
  margin: 1.15em 0;
  overflow-y:auto;
  font-style: none;
}

div.example h3[id],
div.example h4[id],
div.example h5[id],
div.example h6[id] {
  font-family: "ProximaNova-Regular";
  text-align: right;
  margin: 1em 0.9em;
  position: absolute;
  right: 0;
  top: 0;
}

/* == PROJECTS */
.tip {
  padding: 0.7em 1.5em;
  margin: 1.15em 0;
  background-color: #E9E9E9;
  font-family: "Georgia";
}

.note h2:first-child, .tip h2:first-child, .example h2:first-child,
.note h3:first-child, .tip h3:first-child, .example h3:first-child,
.note h4:first-child, .tip h4:first-child, .example h4:first-child,
.note p:first-child, .tip p:first-child, .example p:first-child {
  margin-top: 0;
}

.note p:last-child, .tip p:last-child, .example p:last-child {
  margin-bottom: 0;
}

/* Style functions */
.function, .klass, .var, .mono, .formula{
  font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
  font-size: 16px;
  color: #000000;
}
.mono, .formula{
    font-weight: bold;
}

.formula{
    margin-left: 2em;
}

/* Style note to self */
.notetoself {
  color: #FF0000;
  font-weight: bold;
}

/* Style example heading */
span.example {
  font-family: "ProximaNova-Bold";
  background-color: #CACCCB;
  clear: both;
  display: block;
  font-size:1em;
  padding: 0.7em 1em;
}

/* For the welcome page */

.block-link {
  background-color: #1ed4ed;
  color: #fff;
  border: none;
  display: inline-block;
  font-size: 18px;
  margin: 0.7em auto 0;
  padding: 0.5em 1em;
  text-align: center;
  text-decoration: none; }

/* Image Classes
_____________________________________________________________________________ */

img {
  width: 100%;
  margin: 0;
}

.image-container {
  position: relative;
  margin: 16px 0 16px 0;
}

.image-container img {
  max-width: 100%;
}

.bella img {
  width: 25%;
}

.screenshot img {
  width: 100%;
  margin: 0px;
  //-webkit-box-shadow: 1px 1px 2px gray;
    border:1px solid gray;
  // Need a magic solution for border side borders to be partial, not extend all the way to top
}

.image-container .caption {
  color: #222;
  font-family: "ProximaNova-Regular";
  font-size: 100%; /* 100% == 13px when not inside a p tag */
  border: 0;
}

.half-width,
.half-width-right,
.half-width-right-border {
  margin-top: 1.2em;
  margin-bottom: 1.2em;
  position: relative;
  width: 48%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.half-width {
  float: left;
  margin-right: 2em;
}

.half-width-right,
.half-width-right-border {
  float: right;
  margin-left: 2em;
}

.half-width-right-border img {
  border:1px solid gray;
}

.two-col,
.two-col-borderless,
.three-col
{
  width: 50%;
  box-sizing: border-box;
  padding-right: 1em;
  //margin-right: 1em;
  float: left;
}

.two-col img,
.two-col canvas,
.two-col-borderless canvas,
.three-col img,
.three-col canvas
{
  width: 100%;
  max-width: 100%;
  border:1px solid gray;
  //-webkit-box-shadow: 1px 1px 2px gray;
}

.two-col-borderless img {
  border:0px solid gray;
}

.three-col {
  width: 33%;
}


/* Code Formatting
_____________________________________________________________________________ */

pre {
  width: 100%;
  white-space: pre-wrap;       /* css-3 */
  white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
  white-space: -pre-wrap;      /* Opera 4-6 */
  white-space: -o-pre-wrap;    /* Opera 7 */
  word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

.source-code {
  border: 1px solid #E4E4E4;
  margin-bottom: 2em;
  padding: 0.7em 1.5em;
  background-color: #F8F8F8;
  position: relative;
  clear: both;
}

.source-code a.toggle {
  font-family: 'Helvetica', Arial, sans-serif;
  position: absolute;
  right: 0.8em;
  bottom: -1.8em;
  margin: 0;
  font-size: 0.8em;
  color: #656565;
  z-index:1;
}

.note .source-code,
.example .source-code,
.tip .source-code {
  border-left: none;
}

/* Div wrapper for code blocks */
.code-block {
  font-size: 90%;
  line-height: 1.4em;
  overflow: auto;
  position: relative;
}

pre {
  /*line-height: 1.4em;*/
}

.code-block * {
  position: relative;
}

/* Wrapper for every pairing of code and comment.
Used to catch the .code-comment-line inside of
a relatively positioned parent. */
.code-comment-pair {
  clear: both;
  display: block;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.code-comment-line {
  border-top: 1px dashed #C7C7C7;
  display: block;
  height: 2px;
  overflow-y: auto;
  position: absolute;
  width: 100%;
}

/* Div wrapper for code comments */
.code-comment {
  clear: right;
  color: #444;
  font-style: bold;
  display: block;
  float: right;
  font-family: sans-serif;
  width: 300px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  margin-top: 0.0em;
}

/* The code goes in here. */
.code-block code {
  clear: left;
  display: block;
}

.source-code textarea {
  background-color: #f0f0f0;
  display: none;
  width: 100%;
}

/* CSS for some lists */
.list h4, .table h4 {
  clear: none;
}


@media screen and (max-width:1240px) {
  #container {
    margin-left: 220px;
    margin-right: 0;
  }
}

@media all and (min-width: 1020px) {
  #nav-bar-wrap {
    max-width: 1240px;
    min-width: 1020px;
  }

  #navigator-inner {
    min-width: 1020px;
    max-width: 1240px;
  }

  #toc-holder {
    min-width: 1020px;
    max-width: 1240px;
  }

  #middle {
    min-width: 1020px;
  }
}

/* iPad non-retina */
@media all and (max-width: 1020px) {
  #top {
    display: none;
  }

  #navigator {
    position: relative;
    margin: 0 ;
  }

  #nav-bar-wrap {
    position: relative;
  }

  #middle {
    min-width: auto;
  }

  #toc-holder {
    margin: 0;
    padding: 0;
  }

  #toc-list {
    padding: 0;
    position: relative;
  }

  #toc-list > ul {
    font-size: 16px;
    margin: 1em 0 1.6em;
    text-align: center;
    width: 100%;
  }

  #toc-list > ul li {
    display: inline-block;
    margin: 0.5em 0.8em;
  }

  #container {
    margin: 0;
    max-width: 100%;
    padding: 0 1em;
  }

  #header, #footer {
    width: 100%;
  }
}

@media all and (max-width: 640px) {
  #nav-bar {
    overflow-y: auto;
  }

  #nav-bar h1, #nav-bar h2 {
    display: block;
    float: none;
    position: relative;
    text-align: center;
    width: auto;
  }

  a#purchase-link {
    display: block;
    float: none;
    position: relative;
    text-align: center;
    width: auto;
  }

  #nav-bar h1 {
    font-size: 22px;
  }

  #footer .one-third {
    width: 100%;
  }

  blockquote {
    margin: 0 1.5em 2em;
  }
}
